<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<form name="baidu" action="https://www.baidu.com/s">
    <input name="wd" type="text">
    <button>搜索</button>
</form>
</body>
<script>
    console.log(document.baidu);// form元素
    console.log(document.baidu.wd);// 名字为baidu表单下的名字为wd的元素
</script>
</html>